package com.entmanage.base.oa.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.entmanage.common.annotation.Excel;
import com.entmanage.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 请假申请对象 oa_leave_apply
 *
 * @author lsq
 * @date 2025-09-10
 */
@ApiModel(value = "OaLeaveApply", description = "请假申请对象")
public class OaLeaveApply extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    @ApiModelProperty(value = "主键")
    private Long applyId;

    /** 申请人ID */
    @Excel(name = "申请人ID")
    @ApiModelProperty(value = "申请人ID")
    private Long userId;

    /** 申请人部门ID */
    @Excel(name = "申请人部门ID")
    @ApiModelProperty(value = "申请人部门ID")
    private Long deptId;

    /** 请假类型：年假、事假、病假、调休假、婚假、产假、陪产假、其他 */
    @Excel(name = "请假类型：年假、事假、病假、调休假、婚假、产假、陪产假、其他")
    @ApiModelProperty(value = "请假类型：年假、事假、病假、调休假、婚假、产假、陪产假、其他")
    private String leaveType;

    /** 开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "开始时间")
    private Date startTime;

    /** 结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "结束时间")
    private Date endTime;

    /** 请假天数 */
    @Excel(name = "请假天数")
    @ApiModelProperty(value = "请假天数")
    private BigDecimal durationDays;

    /** 请假小时数 */
    @Excel(name = "请假小时数")
    @ApiModelProperty(value = "请假小时数")
    private BigDecimal durationHours;

    /** 请假事由 */
    @Excel(name = "请假事由")
    @ApiModelProperty(value = "请假事由")
    private String reason;

    /** 附件路径，多个用逗号分隔 */
    @Excel(name = "附件路径，多个用逗号分隔")
    @ApiModelProperty(value = "附件路径，多个用逗号分隔")
    private String attachmentPaths;

    /** 审批人ID列表，格式：101,102 */
    @Excel(name = "审批人ID列表，格式：101,102")
    @ApiModelProperty(value = "审批人ID列表，格式：101,102")
    private String approverIds;

    /** 审批人姓名，如：张三,李四 */
    @Excel(name = "审批人姓名，如：张三,李四")
    @ApiModelProperty(value = "审批人姓名，如：张三,李四")
    private String approverNames;

    /** 抄送人ID列表 */
    @Excel(name = "抄送人ID列表")
    @ApiModelProperty(value = "抄送人ID列表")
    private String ccIds;

    /** 抄送人姓名 */
    @Excel(name = "抄送人姓名")
    @ApiModelProperty(value = "抄送人姓名")
    private String ccNames;

    /** 状态：pending(审批中), approved(通过), rejected(拒绝), canceled(撤销) */
    @Excel(name = "状态：pending(审批中), approved(通过), rejected(拒绝), canceled(撤销)")
    @ApiModelProperty(value = "状态：pending(审批中), approved(通过), rejected(拒绝), canceled(撤销)")
    private String status;

    /** 申请时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    @Excel(name = "申请时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "申请时间")
    private Date applyTime;

    /** 删除标记：0-正常，1-删除 */
    @ApiModelProperty(value = "删除标记：0-正常，1-删除")
    private String delFlag;

    public void setApplyId(Long applyId)
    {
        this.applyId = applyId;
    }

    public Long getApplyId()
    {
        return applyId;
    }
    public void setUserId(Long userId)
    {
        this.userId = userId;
    }

    public Long getUserId()
    {
        return userId;
    }
    public void setDeptId(Long deptId)
    {
        this.deptId = deptId;
    }

    public Long getDeptId()
    {
        return deptId;
    }
    public void setLeaveType(String leaveType)
    {
        this.leaveType = leaveType;
    }

    public String getLeaveType()
    {
        return leaveType;
    }
    public void setStartTime(Date startTime)
    {
        this.startTime = startTime;
    }

    public Date getStartTime()
    {
        return startTime;
    }
    public void setEndTime(Date endTime)
    {
        this.endTime = endTime;
    }

    public Date getEndTime()
    {
        return endTime;
    }
    public void setDurationDays(BigDecimal durationDays)
    {
        this.durationDays = durationDays;
    }

    public BigDecimal getDurationDays()
    {
        return durationDays;
    }
    public void setDurationHours(BigDecimal durationHours)
    {
        this.durationHours = durationHours;
    }

    public BigDecimal getDurationHours()
    {
        return durationHours;
    }
    public void setReason(String reason)
    {
        this.reason = reason;
    }

    public String getReason()
    {
        return reason;
    }
    public void setAttachmentPaths(String attachmentPaths)
    {
        this.attachmentPaths = attachmentPaths;
    }

    public String getAttachmentPaths()
    {
        return attachmentPaths;
    }
    public void setApproverIds(String approverIds)
    {
        this.approverIds = approverIds;
    }

    public String getApproverIds()
    {
        return approverIds;
    }
    public void setApproverNames(String approverNames)
    {
        this.approverNames = approverNames;
    }

    public String getApproverNames()
    {
        return approverNames;
    }
    public void setCcIds(String ccIds)
    {
        this.ccIds = ccIds;
    }

    public String getCcIds()
    {
        return ccIds;
    }
    public void setCcNames(String ccNames)
    {
        this.ccNames = ccNames;
    }

    public String getCcNames()
    {
        return ccNames;
    }
    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getStatus()
    {
        return status;
    }
    public void setApplyTime(Date applyTime)
    {
        this.applyTime = applyTime;
    }

    public Date getApplyTime()
    {
        return applyTime;
    }
    public void setDelFlag(String delFlag)
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag()
    {
        return delFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("applyId", getApplyId())
            .append("userId", getUserId())
            .append("deptId", getDeptId())
            .append("leaveType", getLeaveType())
            .append("startTime", getStartTime())
            .append("endTime", getEndTime())
            .append("durationDays", getDurationDays())
            .append("durationHours", getDurationHours())
            .append("reason", getReason())
            .append("attachmentPaths", getAttachmentPaths())
            .append("approverIds", getApproverIds())
            .append("approverNames", getApproverNames())
            .append("ccIds", getCcIds())
            .append("ccNames", getCcNames())
            .append("status", getStatus())
            .append("applyTime", getApplyTime())
            .append("updateTime", getUpdateTime())
            .append("createBy", getCreateBy())
            .append("updateBy", getUpdateBy())
            .append("createTime", getCreateTime())
            .append("delFlag", getDelFlag())
            .toString();
    }
}
